package com.hotel.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hotel.common.pojo.Room;
import com.hotel.service.roomService;

@RestController
@RequestMapping("/room/manage")
public class roomController {
	@Autowired
	roomService rs=null;
	
	@RequestMapping("/query")
	public List<Room> queryRoom(String roomtype){
		return rs.queryRoom(roomtype);
	}
	
	//单房查询
	 @RequestMapping(value="/queryOne",produces="application/json;charset=utf-8")
	  public Room queryOneRoom(String id){
	   
	     Room room = rs.queryOneRoom(id);
	     System.err.println("单个查："+room.toString());
	     return room;
	  }
	
}
